package com.medusa.aps.business.modules.basic.model.input;

import com.medusa.aps.business.model.constant.RegexPool;
import com.medusa.aps.business.model.enums.State;
import com.medusa.aps.business.common.web.valid.group.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class WorkshopDTO {


    /**
     * id
     */
    @Schema(description = "id")
    @NotNull(message = "id不能为空", groups = {Update.class})
    private Integer id;

    /**
     * 车间名称
     */
    @Schema(description = "车间名称")
    @NotBlank(message = "车间名称不能为空")
    @Size(max = 50, message = "车间名称长度不能超过50")
    private String workshopName;

    /**
     * 车间编码
     */
    @Schema(description = "车间编码")
    @NotBlank(message = "车间编码不能为空")
    @Size(max = 50, message = "车间编码长度不能超过50")
    @Pattern(regexp = RegexPool.ORDER_NO, message = "车间编码只支持数字、字母、符号")
    private String workshopCode;

    /**
     * 用户id
     */
    @Schema(description = "用户id")
    @NotNull(message = "用户id不能为空")
    private Long userId;


    /**
     * 启用状态
     */
    private State state;

}
